package nkw;

import junit.framework.TestCase;

/**
 * Verifies that getDegreesToTurnToDegrees() behaves correctly.
 * 
 * @author Noah Woodden
 */
public class TestBehaviorFour extends TestCase {

  /**
   * Test the getDegreesToTurnToDegrees() functionality.
   */
  public void testDegreesToTurnToDegrees() {
    CompetitiveRobot robot = new CompetitiveRobot();

    assertEquals("Did not return 135 degrees as expected.", 135.0,
        robot.getDegreesToTurnToDegrees(45, 180));
    assertEquals("Did not return -30 degrees as expected.", -30.0,
        robot.getDegreesToTurnToDegrees(45, 15));
    assertEquals("Did not return 135 degrees as expected.", -105.0,
        robot.getDegreesToTurnToDegrees(45, 300));
    assertEquals("Did not return 0 degrees as expected.", 0.0,
        robot.getDegreesToTurnToDegrees(45, 1500));
    assertEquals("Did not return 180 degrees as expected.", 180.0,
        robot.getDegreesToTurnToDegrees(180, 0));

  }
}
